﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using BluePortal.Framework;
using BluePortal.Medias.Core;

namespace BluePortal.Medias.Services.Soap
{
    [ServiceContract(Namespace = "BluePortal.Medias.Services.Soap")]
    public interface IChannelService
    {
    }

    public class ChannelService : IChannelService
    {
        private BCChannel service = new BCChannel();

        #region IVideoChannelService Members

        public FindResult<Channel> FindAll(FindParameters f)
        {
            return service.FindAll(f);
        }

        public FindResult<Channel> FindByMedia(Media m, FindParameters f)
        {
            return service.FindByMedia(m, f);
        }

        public FindResult<Channel> FindByLoginNameWithMedia(string loginName, FindParameters f)
        {
            return service.FindByLoginNameWithMedia(loginName, f);
        }

        public FindResult<Channel> FindAllWithMedia(string loginName, FindParameters f)
        {
            return service.FindAllWithMedia(loginName, f);
        }

        public FindResult<Channel> FindWithMedia(string loginName, Guid chid, FindParameters f)
        {
            return service.FindWithMedia(loginName, chid, f);
        }

        public FindResult<Channel> FindByOwnerWithMedia(string owner, FindParameters f)
        {
            return service.FindByOwnerWithMedia(owner, f);
        }

        public FindResult<Channel> FindTopPopularWithMedia(string loginName, int count)
        {
            return service.FindTopPopularWithMedia(loginName, count);
        }

        public void Add(Guid chid, Guid vid)
        {
            service.Add(chid, vid);
        }

        public void Remove(Guid chid, Guid vid)
        {
            service.Remove(chid, vid);
        }

        #endregion

        #region IBasicService<Channel> Members

        public void Create(Channel item)
        {
            service.Create(item);
        }

        public void Delete(Channel item)
        {
            service.Delete(item);
        }

        public void Update(Channel item)
        {
            service.Update(item);
        }

        public Channel FindByID(Guid id)
        {
            return service.FindByID(id);
        }

        #endregion
    }
}
